package ar.frba.utn.diseñosistemas.Tests;

import junit.framework.Assert;
import ar.frba.utn.diseñosistemas.TP.*;
import org.junit.*;

public class TestUnifiedDate 
{
	UnifiedDate aDate;
	UnifiedDate anotherDate;
	
	@Before
	public void setUp() throws Exception 
	{
		aDate = new UnifiedDate(2, 10, 1989);
		anotherDate = new UnifiedDate(7, 10, 1989);
	}
	
	@Test
	public void TestADateBeforeAnotherDate()
	{
		Assert.assertTrue(aDate.isBeforeThan(anotherDate));
	}
	
	@Test
	public void TestAnotherDateNotBeforeADate()
	{
		Assert.assertFalse(anotherDate.isBeforeThan(aDate));
	}
	
	@Test
	public void TestDaysBetweenADateAndAnotherDate()
	{
		Assert.assertEquals(5, aDate.daysBetween(anotherDate));
	}
	
	@Test
	public void TestDaysBetweenAnotherDateAndADate()
	{
		Assert.assertEquals(5, anotherDate.daysBetween(aDate));
	}
}
